<template>
    <div class="footer">
        <ul>
            <li v-for="item in links"><a href="item.url">{{item.name}}</a></li>
        </ul>
    </div>
</template>

<script>
    // import axios from 'axios';
    import {get} from '../network/request.js'

    export default {
        name: "MyFooter",
        data() {
            return {
                links: []
            }
        },
        mounted() {
            /*
                        axios.get('http://127.0.0.1:9000/getT')
                            .then(res => {
                                console.log(res.data);
                                this.links = res.data
                            }).catch(err => console);
            */
            get('/getT').then(res => {
                console.log(res.data);
                this.links = res.data
            }).catch(err => console);
        }
    }
</script>

<style scoped lang="scss">
    .footer {
        float: left;
        margin-top: 20px;
        width: 100%;
        height: 100px;
        background: aqua;
    }

    ul {
        list-style: none;
        margin: 10px;
        padding: 0px;

        li {
            display: inline-block;
            margin: 10px;
        }
    }
</style>